#!/usr/bin/env python2.5
# encoding: utf-8

if not globals().has_key("esda"):
    execfile("esda.py")
    sys.exit()

init()

import random

for i in range(2):
    name = "Stream%d"%i
    
    newStream(name)
    
    for j in range(10):
        streams[name][4*j+i:4*j+i+4] = random.random()

def productOperator(value1, value2):
    return value1 + value2

newOperatorStream(
    "ProductOfStream1AndStream0",
    "Stream1", "Stream0",
    productOperator)
